<template>
	<div class="welcome">
		<template>
			<el-table :data="logs" border style="width: 100%">
				<el-table-column prop="username" align="center" label="登入账号" width="180">
				</el-table-column>
				<el-table-column prop="lastLogin.ip" align="center" label="上次登入ip">
				</el-table-column>
				<el-table-column prop="lastLogin.loginTime" align="center" sortable label="上次登入时间">
				</el-table-column>
				<el-table-column prop="nowLogin.ip" align="center" label="本次登入ip">
				</el-table-column>
				<el-table-column prop="nowLogin.loginTime" align="center" label="本次登入时间">
				</el-table-column>
			</el-table>
		</template>
	</div>
</template>
<script>
import * as api from "@/api/users"
export default {
	data() {
		return {
			logs: []
		}
	},
	meta: {
		title: "glsy",
		icon: "iconfont icon-shouye1",
	},
	created() {    //发送请求
		api.getLoginApi().then(res => {
			console.log(res.data.data);
			this.logs = res.data.data
		})
	}

};
</script>